﻿@{
    Layout = "~/Views/Shared/_Layout_RTU_well.cshtml";
    ViewBag.Title = "井操作记录";
}
<div class="xds-no-breadcrumb">
    <div class="full-height">
        <div class="full-height-scroll white-bg border-left">
            <div class="wrapper wrapper-content animated fadeInRight">
                <div class="row">
                    <div class="col-md-12">
                        <div class="panel panel-primary" id="list-panel">
                            <div class="panel-heading">
                                <h1 class="panel-title">操作记录</h1>
                            </div>
                            <div class="panel-body">
                                <table id="assets-data-table" class="table table-striped table-bordered" style="width:100%"></table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@section Styles {
    @Styles.Render("~/Content/datatables")
    @Styles.Render("~/plugins/sweetAlertStyles")
}

@section Scripts {
    @Scripts.Render("~/bundles/datatables")
    @Scripts.Render("~/plugins/sweetAlert")
    <script type="text/javascript">
        var assetListVM;
        assetListVM = {
            dt: null,
            reload: function () {
                dt.ajax.url("@Url.Action("GetOperator", "WarnLog")" + "?wellid=" + sessionStorage.wellid).load();
            },
            init: function () {
                dt = $("#assets-data-table").DataTable({
                    "serverSide": true,
                    "proccessing": true,
                    "ajax": {
                        "url": "@Url.Action("GetOperator","WarnLog")" + "?wellid=" + sessionStorage.wellid
                    },
                    "order": [[0, 'desc']],
                    "columns": [
                        { "title": "操作时间", "data": "ActionTime", "searchable": true },
                        { "title": "操作信息", "data": "Describe", "searchable": true },
                        { "title": "操作之前状态", "data": "Status_Before" },
                        { "title": "操作之后状态", "data": "Status_Now", "searchable": true },
                        { "title": "操作人", "data": "OperatorID" },
                        { "title": "操作性质", "data": "ControlType", "searchable": true }
                    ],
                    "lengthMenu": [[10, 25, 50, 100], [10, 25, 50, 100]],
                    "language": {
                        "processing": "处理中...",
                        "lengthMenu": "显示 _MENU_ 项结果",
                        "zeroRecords": "没有匹配结果",
                        "info": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                        "infoEmpty": "显示第 0 至 0 项结果，共 0 项",
                        "infoFiltered": "(由 _MAX_ 项结果过滤)",
                        "infoPostFix": "",
                        "search": "搜索:",
                        "searchPlaceholder": "搜索...",
                        "url": "",
                        "emptyTable": "表中数据为空",
                        "loadingRecords": "载入中...",
                        "infoThousands": ",",
                        "paginate": {
                            "first": "首页",
                            "previous": "上页",
                            "next": "下页",
                            "last": "末页"
                        },
                        "aria": {
                            paginate: {
                                first: '首页',
                                previous: '上页',
                                next: '下页',
                                last: '末页'
                            },
                            "sortAscending": ": 以升序排列此列",
                            "sortDescending": ": 以降序排列此列"
                        },
                        "decimal": "-",
                        "thousands": ","
                    }
                });
            }
        };
        $(document).ready(function () {
            assetListVM.init();
        });
    </script>
}


